<?php

header ("Content-type: image/jpeg");
$id = $_GET['id'] ;
if ( empty($id) )
{
	$image = imagecreatefromjpeg("default.jpg");
} else {
	$filename = "$id.jpg" ;
	if(is_file($filename)) {
		$image = imagecreatefromjpeg("$id.jpg");
	} else {
		$image = imagecreatefromjpeg("default.jpg");
	}
}
imagepng($image);
?>
